package com.dimpt.cloud.common.exception;


import com.dimpt.cloud.common.config.ResponseInfo;


public class FailedException extends RuntimeException {

    private int code;
    private String messgae;

    public FailedException(String msg) {
        this.code = ResponseInfo.UNKNOW_ERROR.getErrorCode();
        this.messgae = msg;
    }

    public FailedException(int code, String msg) {
        this.code = code;
        this.messgae = msg;
    }

    public int getCode(){
        return this.code;
    }

    public void setCode(int code){
        this.code = code;
    }

    public String getMessgae() {
        return messgae;
    }

}
